package com.dragon.concurrent.demo.deadlock;

public class DeadLockService {

    private Object lock = new Object();

    private OtherService otherService;

    public DeadLockService(OtherService otherService) {
        this.otherService = otherService;
    }

    public void s1() {
        System.out.println("s1===============");
        synchronized (lock) {
            otherService.s2();
        }
    }
}
